<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
<title>飞腾会-FitaClub</title>
<%@ include file="/WEB-INF/include/meta.jsp"%>
<%@ include file="/WEB-INF/include/css.jsp"%>
</head>
<!-- end header -->

<body>
  <div class="page-group">
    <div class="page page-current bg-light-gray">
      <header class="bar bar-nav fita-header">
        <a href="javascript:history.back(-1);" class="icon icon-left pull-left"></a>
        <a class="icon icon-menu pull-right open-panel"></a>
        <h1 class="title">保留预定成功</h1>
      </header>
      
      <div class="bar bar-footer fita-footer order-button">
        <a href="${ctx.host}/cars/search" class="button">返回首页</a>
        <a href="${ctx.host}/shopping/result?type=pay&orderId=${order.id}" class="button">即刻支付</a>
      </div>
      
      <div class="content staying-orders-layout">
      
      	<div class="tips">
      	  <span class="iconfont iconfont-warn"></span>
      	  <p class="wran-text">已为您保留预定，当前当地货币的价格已被锁定<br>请于<fmt:formatDate value="${order.cancelEndDate}" pattern="yyyy/MM/dd HH:mm"/>前支付，过时订单将被取消<br>温馨提示:完成支付前价格会因汇率变动而有所变动</p>
      	</div>
        <div class="card order-info-card">
          <div class="card-content">
	          <div class="item">
	            <span class="label">取车：</span>
	            <div class="location">${pickupLocation.cityName}</div>
                <div class="detail"><p>${pickupLocation.name}</p><p><fmt:formatDate value="${order.pickupDate}" pattern="yyyy-MM-dd HH:mm" /> </p></div>
              </div>
              <div class="item">
                <span class="label">还车：</span>
                <div class="location">${returnLocation.cityName}</div>
                <div class="detail"><p>${returnLocation.name}</p><p><fmt:formatDate value="${order.returnDate}" pattern="yyyy-MM-dd HH:mm" /></p></div>
              </div>
	        </div>
        </div>
        
        <div class="list cars-list-layout">
          <div class="card fita-card">
            <div class="card-content">
              <div class="card-content-inner">
                <a href="">
                  <div class="car-title">
                  <c:choose>
                      <c:when test="${persist.modelGroups[order.details.carInfo.modelName] != null}">
                         ${persist.modelGroups[order.details.carInfo.modelName].chineseName}
                      </c:when>
                      <c:otherwise>
                        ${order.details.carInfo.modelName}
                      </c:otherwise>
                    </c:choose>
                  </div>
                  <div class="row no-gutter">
                    <div class="col-66 cars-type">
                      <c:choose>
                      <c:when test="${persist.modelGroups[order.details.carInfo.modelName] != null}">
                         <img src="${cloudContext.domain}/${persist.modelGroups[order.details.carInfo.modelName].picture}"/>
                      </c:when>
                      <c:otherwise>
                        <img src="${order.details.carInfo.picture}"/>
                      </c:otherwise>
                    </c:choose>
                      <p>
                      	 ${persist.getVehicleSize(order.details.carInfo.modelCodeClass).chineseName}/
                         ${persist.getVehicleCategory(order.details.carInfo.categoryCode).chineseName}/
                         ${order.details.carInfo.transmissionType  eq 'MANUAL' ? '手动' : '自动'}/
                         ${order.details.carInfo.baggageQuantity}行李/
                         ${order.details.carInfo.passengerQuantity}座位/
                         ${order.details.carInfo.airConditionIn ? '含空调' : '无空调'}/
                         ${order.details.carInfo.modelCodeType eq 'B' ? '2门' : car.modelCodeType eq 'C' ? '2或4门' : '4门或5门'}</p>
                    </div>
                    <div class="col-33 price-box" style="margin-top:.75rem;">
                      <c:choose>
                        <c:when test="${set.payType.arrivepay}">
                          <c:set var="exchangeRate" value="${persist.exchangeRate(order.currencyCode)}"/>
                          <div class="item" style="margin-bottom: 1.25rem;">
                            <p>官方零售价：</p>
                            <p class="price"><span style="font-size: .75rem;">${exchangeRate.currencySymbol}</span><fmt:formatNumber value="${order.retailAmount/100}" type="number" maxFractionDigits="2" pattern="0.00"/></p>
                          </div>
                          <div class="item" style="margin-bottom: 1.25rem;">
                            <p>返佣：</p>
                            <p class="price current-price"><span style="font-size: .75rem;">${exchangeRate.currencySymbol}</span><fmt:formatNumber value="${order.agentCommission}" type="number" maxFractionDigits="2" pattern="0.00"/></p>
                          </div>
                        </c:when>
                        <c:otherwise>
                          <div class="item" style="margin-bottom: 1.25rem;">
                            <p>官方零售价：</p>
                            <p class="price"><span style="font-size: .75rem;">￥</span><fmt:formatNumber value="${order.retailAmount/100}" type="number" maxFractionDigits="2" pattern="0.00"/></p>
                          </div>
                          <div class="item" style="margin-bottom: 1.25rem;">
                            <p>${set.payType.floatPrepay ? '浮动' : '常规'}价：</p>
                            <p class="price current-price"><span style="font-size: .75rem;">￥</span><fmt:formatNumber value="${order.cnyPayPrice}" type="number" maxFractionDigits="2" pattern="0.00"/></p>
                          </div>
                        </c:otherwise>
                      </c:choose>
                    </div>
                  </div>
                </a>
              </div>
            </div>
          </div>
        </div>
        
      </div>
      <!-- <div class="content">
      <p>订单结果页</p>
        <a ctx.host="">回到首页</a>
      </div> -->
    </div>
    
    <div class="panel-overlay"></div>
    <div class="panel panel-right panel-cover fita-panel">
      <div class="list-block contacts-block no-margin">
        <p class="menu-title close-panel">关闭</p>
	      <ul>
	        <li>
	          <a href="${ctx.host}/cars/search" class="item-content item-link">
	            <div class="item-inner">
	              <div class="item-title">立即租车</div>
	            </div>
	          </a>
	        </li>
	        <%-- <li>
	          <a href="${ctx.host}/orders" class="item-content item-link">
	            <div class="item-inner">
	              <div class="item-title">我的订单</div>
	            </div>
	          </a>
	        </li> --%>
	        <li>
            <a href="${ctx.host}/profile" class="item-content item-link">
              <div class="item-inner">
                <div class="item-title">个人中心</div>
              </div>
            </a>
          </li>
	      </ul>
      </div>
    </div>
  </div>
  <%@ include file="/WEB-INF/include/script.jsp"%>
  
  
</body>
</html>